<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title>解析Event接口</title>
        <script>
            (()=>{
                let array;
                console.log( 'Event的类属性(值属性和函数属性)' );
                array = Object.getOwnPropertyNames( Event );
                array.forEach( name => console.log( '\t', name ) );
                console.log( 'Event的原型属性(值属性和函数属性)' );
                array = Object.getOwnPropertyNames( Event.prototype );
                array.forEach( name => console.log( '\t', name ) );
                console.log( Event.prototype.constructor === Event );
            })();
        </script>
    </head>
    <body>
        <h1>解析Event接口</h1>
        <div class="wrapper">
            <h3>Event的类属性</h3>
            <ul>
                <li>Event.NONE 取值为 0 </li>
                <li>Event.CAPTURING_PHASE 取值为 1 </li>
                <li>Event.AT_TARGET 取值为 2 </li>
                <li>Event.BUBBLING_PHASE 取值为 3 </li>
            </ul>
        </div>
        <div class="wrapper">
            <h3>Event的原型属性</h3>
            <ul>
                <li>Event.prototype.type 表示事件类型</li>
                <li>Event.prototype.target 表示事件目标(即事件源)</li>
                <li>Event.prototype.currentTarget 表示按照事件流到达的当前目标</li>
                <li>Event.prototype.eventPhase 表示事件处于哪个阶段</li>
                <li>Event.prototype.preventDefault() 阻止事件默认行为</li>
                <li>Event.prototype.stopPropagation() 阻止事件传播</li>
                <li>Event.prototype.stopImmediatePropagation() 阻止监听同一事件的其他事件监听器被调用</li>
                <li>Event.prototype.NONE 取值为 0 </li>
                <li>Event.prototype.CAPTURING_PHASE 取值为 1 </li>
                <li>Event.prototype.AT_TARGET 取值为 2 </li>
                <li>Event.prototype.BUBBLING_PHASE 取值为 3 </li>
            </ul>
        </div>
        <p>请在浏览器终端中查看运行结果</p>
        <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/Event/stopImmediatePropagation">stopImmediatePropagation</a>
    </body>
</html>